﻿using System;

/// <summary>
/// Namespace for MyActions
/// </summary>
namespace BitsOfStuff.MyActions
{
    /// <summary>
    /// Action that indicate , this is decision action , so we decidign bewteen two actions
    /// </summary>
    [Serializable()]
    public class MyDecisionAction : MyAction
    {
        private const int _myDecisionAction = 0;

        private readonly MyAction _myTimeredAction;

        public override bool makeAction()
        {
            return false;
        }

        /// <summary>
        /// Constructor of action
        /// </summary>
        /// <param name="myTimeredAction">Base action , one that is subaction of others</param>
        public MyDecisionAction(MyAction myTimeredAction)
        {
            _myTimeredAction = myTimeredAction;
        }

        /*
                private void timerElepsed(object sender, ElapsedEventArgs e)
                {
                    _myTimeredAction.makeAction();
                }
        */

        /// <summary>
        /// function that return stodec subActions
        /// </summary>
        /// <returns>stored subactions</returns>
        public MyAction getTimeredAction()
        {
            return _myTimeredAction;
        }

        /// <summary>
        /// Parametress constructor based of parent
        /// </summary>
        public MyDecisionAction()
            : base(_myDecisionAction)

        { }
    }
}